# Copyright (C) 2000-2005 Philips Electronics N.V.
# 
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or 
# (at your option) any later version.
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with this program; see the file gnu_license.txt.  If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  
# 

# RESULT determines what will be built, set to library or binary
RESULT     = library

# The filename of the output
OUT        = libcfront.a

CONFIG_FILES = $(CFRONT_ROOT)/Config.mk
LIBADD     =

# Where everything will be installed
PREFIX   = $(CFRONT_ROOT)/$(UNAME)
INCLUDE_PREFIX = $(PREFIX)/include/cfront

# What will be installed, and where.
# can be. bin/aap, lib/libnoot.a include/mies.h
INSTALL    = lib/libcfront.a \
	     include/cfront.h \
	     include/init.h \
	     include/type_scope.h \
	     include/declarations.h \
	     include/expressions.h \
	     include/statements.h \
	     include/type.h \
	     include/spectype.h \
	     include/typing.h \
	     include/eval.h \
	     include/platform.h \
	     include/cfront_defs.h \
	     include/cfront_parse.h \
	     include/cfront_doggy.h \
	     include/cfront.md \
	     include/cfront.types \
	     include/cfront.dog.types \
	     include/cfrontPrint.h \
	     include/fe_flags.h \
	     include/macros.h \
	     include/ast.h \
	     include/attribute.h \
	     include/doggy_api.h \
	     include/gcc.h \
	     include/stack_frame.h \
	     include/errors.h \
             include/semantics.h \
	     include/ap.h 

# _All_ files in the project.
FILES      =  type.c type.h \
	      spectype.c spectype.h \
              typing.c typing.h \
              init.c init.h \
              platform.c platform.h \
              eval.c eval.h \
	      declarations.c declarations.h \
	      expressions.c expressions.h \
	      fe_flags.c fe_flags.h \
	      macros.c macros.h \
	      statements.c statements.h \
	      attribute.c attribute.h \
	      type_scope.c type_scope.h \
	      stack_frame.c stack_frame.h \
	      ast.c ast.h \
	      strings.c strings.h \
	      doggy_api.h \
	      gcc.c gcc.h \
	      cfront.front \
              cfront.dog.types \
              errors.egg \
              semantics.c semantics.h \
	      ap.c ap.h

# -D flags for the C preprocessor
DEFS       = -DYYDEBUG=1 -DYYMAXDEPTH=100000 \
             -Dfront_input=cfront_in -Dfront_parse=cfront_parse -D_CFRONT

# -I flags for the C preprocessor
INCLUDES   = -I$(SRC)/include \
	     -I$(PREFIX)/include \
             -I$(FRONT_include)

# Flags for Front
FRONTFLAGS = -doggy -w -back-end-hooks -no-lalr \
             -multi-start "%" -user-fields -genpretty -left-recursive

# C preprocessor flags
CPPFLAGS   =

# C compilation flags
CFLAGS     = -g -W -Wall

# Libraries to link with
LIBS       =

# Linker flags
LDFLAGS    = 

# Where to build everything
BUILD      = $(SRC)/$(UNAME)

# These are not removed on a distclean
NOCLEAN    = CVS 

# Make targets:
#   make all       - builds $(OUT)
#   make clean     - removes all files generated during a "make all"
#   make distclean - removes all files except $(FILES), $(NOCLEAN), project.mk
#                    and the makefile
#   make install   - installs the files mentioned in $(INSTALL) in the $(PREFIX)
#                    directory, currently the makefile can only install in
#                    $(PREFIX)/bin, $(PREFIX)/lib, and $(PREFIX)/include
#   make uninstall - removed  the files mentioned in $(INSTALL) from $(PREFIX)

# User vars
CFRONT_ROOT = $(SRC)/..
